<?php
/* @var $this FavoriteController */
/* @var $model Favorite */
?>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr class="texteSimple">
          <td>&nbsp;</td>
        </tr>			
        <tr>
          <td align="center" class="titresIndex">Gestion Coups de coeur</td>
        </tr>
        <tr>
          <td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0" id="pageFooter">
			<tr>
				<td  class="texteSimple">
					<?php if (count($dataProvider->keys)<6) echo $this->renderPartial('_form'); else {echo "Vous avez atteint le nombre maximum de favoris (6).";} ?>
				</td>
			</tr>     
	        <tr>
	          <td class="texteSimple"><br>	
				<?php $this->widget('zii.widgets.grid.CGridView', array(
					'id'=>'favorite-grid',
					'dataProvider'=>$dataProvider,
					'cssFile' => Yii::app()->baseUrl . '/css/dbs.css',
					'itemsCssClass' => 'premiumGrid',						
					'columns'=>array(
							'idLocation.name',
							'idArea.name',
							array(
									'class'=>'CButtonColumn',
									'template'=>'{delete}',
									'deleteButtonImageUrl' => Yii::app()->baseUrl . '/images/icon_delete.png',
							),
						),
				)); ?>
				</td>
			</tr>
			</table>
			</td>
		</tr>
	</table>
